package com.chajia;

import com.chajia.util.ConnectionBuffer;
import com.chajia.util.LogUtil;


import java.util.Properties;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-12-29
 * Time: 上午3:13
 * To change this template use File | Settings | File Templates.
 */
public class StartLoader {
    @SuppressWarnings("rawtypes")private final static Class cls=(StartLoader.class);

    public static void database()throws Exception{
        LogUtil.debug(cls, "database", "database...........................");
        Properties prop = new Properties();
        prop.load(StartLoader.class.getClassLoader().getResourceAsStream("db_config.properties"));
        ConnectionBuffer.init((String) prop.getProperty("DB_DRIVER"),
                (String) prop.getProperty("DB_URL"), (String) prop.getProperty("DB_USERNAME"),
                (String) prop.getProperty("DB_PASSWORD"),Integer.parseInt((String) prop.getProperty("DB_ICONTS")) ,
                Integer.parseInt((String) prop.getProperty("DB_CCONTS")), Integer.parseInt((String) prop.getProperty("DB_MCONTS")));
    }

    public static void instance()throws Exception{
        final String method="instance";

    }
    public static void data() throws Exception{

    }

    public static void cache() throws Exception{
        final String method = "cache";

    }
}
